import { getProdOrderTypeList } from "@/api/order/mesProdOrderPlan";

export const pqformDescDialog = {
  data() {
    return {
      pcformDescDialog: {
        span: 24,
        disabled: false,
        isShowSubmitBtn: true,
        formDesc: {
          planCode: {
            type: "input",
            label: $i18n.t("mesProdOrderPlan.productionOrderCode"),
            layout: 8,
            disabled: true,
          },
          saleCode: {
            type: "input",
            label: $i18n.t("mesProdOrderPlan.salesOrderCode"),
            layout: 8,
            disabled: true,
          },
          prodOrderType: {
            type: "select",
            label: $i18n.t("mesProdOrderPlan.prodOrderType"),
            layout: 8,
            disabled: true,
            prop: {
              value: "value",
              text: "description",
            },
            options: async (data) => {
              const list = await getProdOrderTypeList();
              return list.data.result;
            },
          },
          unit: {
            type: "input",
            label: $i18n.t("mesProdOrderPlan.measureUnit2"),
            layout: 8,
            disabled: true,
          },
          prodCode: {
            type: "input",
            label: $i18n.t("mesProdOrderPlan.goodsCode"),
            layout: 8,
            disabled: true,
          },

          prodName: {
            type: "input",
            label: $i18n.t("mesProdOrderPlan.goodsName"),
            layout: 8,
            disabled: true,
          },
          seriesCode: {
            type: "input",
            label: $i18n.t("mesProdOrderPlan.seriesCode"),
            layout: 8,
            disabled: true,
          },

          seriesName: {
            type: "input",
            label: $i18n.t("mesProdOrderPlan.seriesName"),
            layout: 8,
            disabled: true,
          },
          // deliveryDate: {
          //   type: "date",
          //   label: "交货期",
          //   layout: 8,
          //   attrs: {
          //     valueFormat: "yyyy-MM-dd",
          //   },
          //   disabled: true,
          // },
          // slackTime: {
          //   type: "number",
          //   label: "交货期宽裕天数",
          //   layout: 8,
          //   disabled: true,
          // },
          orderList: {
            layout: 24,
            type: "number",
          },
        },
      },
    };
  },
};
